<?php

/**
 * 
 * @author sunny5156  <137898350@qq.com>
 * @date 2015-8-26
 * @version
 */

namespace Common\Model;
class  RoleMapsModel extends CommonModel
{
    
    protected $tableName =  'role_maps';
    
    public function getMenuIdsByRoleId ($role_id)
    {
        $data = $this->where(array('role_id' => $role_id))->select();

        $return = array();
        foreach($data as $val){
            $return[$val['menu_id']] = $val['menu_id'];
        }
        return $return;
    }
    
}
